package vis.app;

import processing.core.PApplet;

public abstract class VisualObject {
	protected PApplet p;

	public VisualObject(PApplet parent) {
		this.p = parent;
	}

	/**
	 * update the internal state, the private information
	 */
	public abstract void update();

	/**
	 * call PApplet drawing function to show up the
	 */
	public abstract void display();

	/**
	 * call each frame to update the information and display to screen
	 */
	public void run() {
		this.update();
		this.display();
	}
}
